package com.gongj.create;

import com.gongj.xml.bean.Person;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CreateMain {

	public static void main(String[] args) {
		// 测试创建Bean的过程 使用 spring-config4.xml

		ClassPathXmlApplicationContext context =
				new ClassPathXmlApplicationContext("spring-config4.xml");
		A a = (A)context.getBean("aa");
		System.out.println(a);
//		System.out.println(a+ "-===" + a.hashCode());
//		A a2 = (A)context.getBean("aa",new B(),"uanjfjef");
//		System.out.println(a2+ "-===" + a2.hashCode());
//		A a3 = (A)context.getBean("aa");
//		System.out.println(a3 + "-===" + a3.hashCode());

	}
}
